<div class="problemindexholder" problemindex="C">
 <div class="ttypography">
  <div class="problem-statement">
   <div class="header">
    <div class="title">
     C. Ever-Hungry Krakozyabra
    </div>
    <div class="time-limit">
     <div class="property-title">
      time limit per test
     </div>
     1 second
    </div>
    <div class="memory-limit">
     <div class="property-title">
      memory limit per test
     </div>
     256 megabytes
    </div>
    <div class="input-file">
     <div class="property-title">
      input
     </div>
     standard input
    </div>
    <div class="output-file">
     <div class="property-title">
      output
     </div>
     standard output
    </div>
   </div>
   <div>
    <center>
     <img class="tex-graphics" src="/predownloaded/64/e2/64e2e1c6c6e0d677fa5dc9d082f5ea8cadc8248b.png" style="max-width: 100.0%;max-height: 100.0%;"/>
    </center>
    <p>
     Recently, a wild Krakozyabra appeared at Jelly Castle. It is, truth to be said, always eager to have something for dinner.
    </p>
    <p>
     Its favorite meal is natural numbers (typically served with honey sauce), or, to be more precise, the zeros in their corresponding decimal representations. As for other digits, Krakozyabra dislikes them; moreover, they often cause it indigestion! So, as a necessary precaution, Krakozyabra prefers to sort the digits of a number in non-descending order before proceeding to feast. Then, the leading zeros of the resulting number are eaten and the remaining part is discarded as an
     <span class="tex-font-style-it">
      inedible tail
     </span>
     .
    </p>
    <p>
     For example, if Krakozyabra is to have the number
     <span class="tex-span">
      57040
     </span>
     for dinner, its
     <span class="tex-font-style-it">
      inedible tail
     </span>
     would be the number
     <span class="tex-span">
      457
     </span>
     .
    </p>
    <p>
     Slastyona is not really fond of the idea of Krakozyabra living in her castle. Hovewer, her natural hospitality prevents her from leaving her guest without food. Slastyona has a range of natural numbers from
     <span class="tex-span">
      <i>
       L
      </i>
     </span>
     to
     <span class="tex-span">
      <i>
       R
      </i>
     </span>
     , which she is going to feed the guest with. Help her determine how many distinct
     <span class="tex-font-style-it">
      inedible tails
     </span>
     are going to be discarded by Krakozyabra by the end of the dinner.
    </p>
   </div>
   <div class="input-specification">
    <div class="section-title">
     Input
    </div>
    <p>
     In the first and only string, the numbers
     <span class="tex-span">
      <i>
       L
      </i>
     </span>
     and
     <span class="tex-span">
      <i>
       R
      </i>
     </span>
     are given – the boundaries of the range
     <span class="tex-span">
      (1 ≤
      <i>
       L
      </i>
      ≤
      <i>
       R
      </i>
      ≤ 10
      <sup class="upper-index">
       18
      </sup>
      )
     </span>
     .
    </p>
   </div>
   <div class="output-specification">
    <div class="section-title">
     Output
    </div>
    <p>
     Output the sole number – the answer for the problem.
    </p>
   </div>
   <div class="sample-tests">
    <div class="section-title">
     Examples
    </div>
    <div class="sample-test">
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>1 10<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>9<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>40 57<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>17<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>157 165<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>9<br/></pre>
     </div>
    </div>
   </div>
   <div class="note">
    <div class="section-title">
     Note
    </div>
    <p>
     In the first sample case, the
     <span class="tex-font-style-it">
      inedible tails
     </span>
     are the numbers from
     <span class="tex-span">
      1
     </span>
     to
     <span class="tex-span">
      9
     </span>
     . Note that
     <span class="tex-span">
      10
     </span>
     and
     <span class="tex-span">
      1
     </span>
     have the same
     <span class="tex-font-style-it">
      inedible tail
     </span>
     – the number
     <span class="tex-span">
      1
     </span>
     .
    </p>
    <p>
     In the second sample case, each number has a unique
     <span class="tex-font-style-it">
      inedible tail
     </span>
     , except for the pair
     <span class="tex-span">
      45, 54
     </span>
     . The answer to this sample case is going to be
     <span class="tex-span">
      (57 - 40 + 1) - 1 = 17
     </span>
     .
    </p>
   </div>
  </div>
  <p>
  </p>
 </div>
</div>
